home *** CD-ROM | disk | FTP | other *** search
- ; *** Great Courts HD loader v1.0
- ; *** Written by Jean-François Fabre
-
- include "jst.i"
-
- HD_PARAMS "greatcourts.d",904800,1
-
- loader:
- Mac_printf "Great Courts HD Loader & fix v0.9"
- Mac_printf "Coded by Jean-François Fabre © 2000"
-
- JSRABS LoadDisks
-
- moveq.l #0,D0
- move.l #CACRF_CopyBack,D1
- JSRABS Degrade
-
- GO_SUPERVISOR
- SAVE_OSDATA $80000
-
- JSRGEN FreezeAll
-
- bsr InstallBoot
-
- ; **** boot stuff and patch
-
- JSRGEN FlushCachesHard
-
- jmp $652E.W ; skip vector overwrite & random value read ??
-
- InstallBoot:
- lea $6520,A0
- moveq.l #1,D0
- move.l #$D24A,D1
- bsr ReadDisk
-
- ; disk read routine
-
- PATCHUSRJMP $134FE,ReadDisk
- ; move.w #$4BCE,$ADDC
-
- ; keyboard interrupt (quit key & fix)
-
- PATCHUSRJSR $B6D4,KbInt
- PATCHUSRJMP $B700,EndKbInt
- move.w #$600E,$B6B6
- PATCH_RTS $B742
- move.w #$C018,$9EC0
- move.w #$C018,$9DFC
-
- ; patch keyword protection
-
- move.w #$42B9,$7F60.W
- move.w #$601A,$7F44.W
-
- rts
-
- EndKbInt:
- move.w #$8,$DFF09C
- RTE
-
- KbInt:
- move.b D0,$B710
- cmp.b #$5F,D0
- bne.b .noquit
- JSRGEN InGameExit
- .noquit
- bset #6,$BFEE01
- BEAM_DELAY 3
- bclr #6,$BFEE01
- rts
- ; < A0: out buffer
- ; < D0: start track
- ; < D1: length to read in bytes
-
- ReadDisk:
- STORE_REGS D1-A6
- cmp.w #$50,D0
- bcs.b .side1
- subq.l #2,D0
- subq.l #7,D0
- .side1
- subq.l #1,D0
- move.l D0,D2
- mulu #$1790,D2
- moveq.l #0,D0
- JSRGEN ReadDiskPart
-
- JSRGEN FlushCachesHard
- RESTORE_REGS D1-A6
- moveq.l #0,D0
- rts
-